package net.sppan.base.service.impl;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import net.sppan.base.dao.IContentUnreviewedDao;
import net.sppan.base.dao.support.IBaseDao;
import net.sppan.base.entity.ContentUnreviewed;
import net.sppan.base.service.IContentUnreviewedService;
import net.sppan.base.service.support.impl.BaseServiceImpl;
 

@Service
public class ContentUnreviewedServiceImpl extends BaseServiceImpl<ContentUnreviewed, Long>
implements  IContentUnreviewedService  {
	@Autowired
	private  IContentUnreviewedDao contentUnreviewedDao;

	@Override
	public IBaseDao<ContentUnreviewed, Long> getBaseDao() {
		return this.contentUnreviewedDao;
	}
	@Override
	public Page<ContentUnreviewed> findContentTask(String status ,Pageable pageable){
		return contentUnreviewedDao.findContentTask(Arrays.asList(status.split(",")),pageable);
	}
	
	@Override
	public List<ContentUnreviewed> findContentUnreviewed(String status, Pageable pageable) {
		return contentUnreviewedDao.findContentUnreviewed(status,pageable);
	}
	
	@Override
    public Integer countTask(String status){
		return contentUnreviewedDao.countContenTask(Arrays.asList(status.split(",")));
    }
	@Override
	public Integer countTaskByDyId(String dyId){
		return contentUnreviewedDao.countTaskByDyId(dyId);
	}
	
	@Override
	public void updateList(List<Long> ids,String status){
		contentUnreviewedDao.updateList(ids,status);
	}
	@Override
	public Integer countTaskPassByDyId(String trim) {
		return contentUnreviewedDao.countTaskPassByDyId(trim);
	}
}
